1. Field of the Invention
The present invention relates to a recording apparatus and method for recording AV data and a program recording medium.
2. Related Art of the Invention
A broadcasting station for BS broadcasting, CS broadcasting or the like broadcasts programs, using an MPEG2 transport-stream. A STB (Set Top Box; satellite broadcasting receiver) receives a broadcast wave carrying the programs, decodes AV data representing the programs, converts the AV data into analog data, and displays on a television monitor.
Further, as to a program among those which a viewer wishes to enjoy after the program is aired or watch repeatedly, after receipt by the STB, the program is transmitted to a recording apparatus, such as a hard disk device, through an IEEE1394 bus (IEEE standard for High performance Serial Bus described in IEEE1394-1995). The recording apparatus thus records transmitted programs one after another.
While the recording apparatus thus records AV data, the AV data are written in each recording block of a recording medium. The recording apparatus has, on its main memory, file management information which indicates which recording block stores the AV data. After recording of the AV data finishes, the recording apparatus writes the file management information in the recording medium.
FIG. 9 shows an example of the file management information. Shown in FIG. 9 is file management information which is used in MS-DOS, Windows, etc. In the example in FIG. 9, there are twelve recording blocks, for the ease of understanding. In reality, there are a commensurable number of recording blocks to a storage capacity of a hard disk.
The file management information consists of information called an FAT (file allocation table) 50 and information called a directory 53.
The FAT 50 is a table in which addresses 51, which are addresses of the recording blocks, and Next addresses 52, which are addresses of the next recording blocks, are paired so as to indicate in which order data of files are stored in which recording blocks.
Meanwhile, the directory 53 is a table for managing files hierarchically, which pairs up file names 54, top addresses 55, which are addresses of top recording blocks which hold the data of the files, and overwrite allowance 56 which denote attributes which represent whether the files are writable only or overwritable, etc.
Using the FAT 50 and the directory 53, it is possible to manage processes such as creation, editing, deletion of files, etc.
That is, in a conventional recording apparatus, most recent file management information on a main memory is recorded in a recording medium after AV data are recorded on the recording medium.
By the way, if power supply to recording apparatus is cut off during recording of AV data, etc., file management information on a main memory is deleted before it is written in a recording medium. This makes it impossible to tell in which portion of the recording medium a portion already recorded of the AV data is recorded, and hence, to access the portion already recorded.
That is, when the file management information is destroyed or lost during recording of the AV data, it is not possible to access the portion of the AV data already recorded on the recording medium.
SUMMARY OF THE INVENTION
Considering the problem that it is not possible to access a portion of AV data already recorded on a recording medium if file management information is destroyed or lost during recording of the AV data, the present invention aims to provide a recording apparatus method and a program recording medium with which it is possible to restore file management information so that when the file management information is destroyed or lost during recording of AV data, a portion of the AV data already recorded on the recording medium can be accessed.
One aspect of the present invention is a recording apparatus which is characterized in comprising:                recording by recording means which records audio visual data (hereinafter referred to as “AV data”) on a recording medium; and        file restoration means which, when file management information for managing a file recorded on said recording medium is destroyed or lost while said recording means records said AV data, restores or generates said file management information so as to make it possible to access a portion of said AV data already recorded on said recording medium.        
Another aspect of the present invention is a recording apparatus in, characterized in that said recording means records on said recording medium an address of a top recording block in which said-AV data are to be recorded, at the start of recording of said AV data,                said AV data are recorded in continuous recording blocks of said recording medium, and        when said file management information for managing a file recorded on said recording medium is destroyed or lost during recording of said AV data on said recording medium, said file restoration means recreates said portion already recorded based on the address of said top recording block, finds a discontinuous point, and restores or generates said file management information.        
Still another aspect of the present invention is a recording apparatus, characterized in that said recording means records said AV data in discontinuous recording blocks of said recording medium, and                when said file management information for managing a file recorded on said recording medium is destroyed or lost during recording of said AV data on said recording medium, said file restoration means recreates said portion already recorded utilizing old file management information which is recorded on said recording medium, finds a discontinuous point, and restores or generate management information.        
Yet another aspect of the present invention is a recording apparatus characterized in that there is a predetermined rule regarding an order of writing in recording blocks for the purpose of writing said AV data in recording blocks of said recording medium, and                said file restoration means recreates said portion already recorded utilizing said rule.        
Still yet another aspect of the present invention is a recording apparatus, characterized in that said AV data are in compliance with MPEG, and                said discontinuous point is a place where a value of PCR (Program Clock Reference) is discontinuous.        
A further aspect of the present invention is a recording apparatus, characterized in that said AV data are in compliance with MPEG, and                said discontinuous point is a place where a value of PID (Packet Identification) is discontinuous.        
A still further aspect of the present invention is a recording apparatus characterized in that said recording medium is a hard disk.
A still yet further aspect of the present invention is a program recording medium which is characterized in that said program recording medium is readable with a computer, and that said program recording medium stores a program which allows a computer to execute all or some functions of all or some means of a recording apparatus.